<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第 29 题</title>
    <script type="text/javascript">
        /*
        29、有这样一个代码:

            switch (name) {
                case "jt":
                    alert('金团网');
                    break;
                case "ejt":
                    alert('金团相相贷');
                    break;
                case "ejin":
                    alert("网上综合金融体验馆");
                    break;
                default:
                    alert("金团网络典当");
            }

        请用if来实现上面的效果   
        */
        setTimeout(() => {
            // 用户输入
            var oInput = prompt("请输入金融、金团相关拼音简写", "jt");

            // 判断
            if (oInput == "jt") {
                alert('金团网');
            } else if (oInput == "ejt") {
                alert('金团相相贷');
            } else if (oInput == "ejin") {
                alert("网上综合金融体验馆");
            } else {
                alert("金团网络典当");
            }
        }, 0);
    </script>
</head>

<body>

</body>

</html>